package com.zoffy.ybuhelper.dao;

import androidx.room.Dao;
import androidx.room.Query;
import com.zoffy.ybuhelper.pojo.entity.Eat;

import java.util.List;

@Dao
public interface EatDao {
    @Query("SELECT menu.id menu_id, menu.name menu_name, menu.deleted menu_deleted, origin.id origin_id, origin.name origin_name From menu left outer JOIN origin ON menu.origin_id=origin.id")
    List<Eat> getAll();
    @Query("SELECT menu.id menu_id, menu.name menu_name, menu.deleted menu_deleted, origin.id origin_id, origin.name origin_name From menu left outer JOIN origin ON menu.origin_id=origin.id WHERE menu_deleted=0 and origin.deleted=0 ")
    List<Eat> getUndeletedAll();
}
